# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Dataproc.V1.Model.ExecutorMetricsDistributions do
  @moduledoc """


  ## Attributes

  *   `diskBytesSpilled` (*type:* `list(float())`, *default:* `nil`) - 
  *   `failedTasks` (*type:* `list(float())`, *default:* `nil`) - 
  *   `inputBytes` (*type:* `list(float())`, *default:* `nil`) - 
  *   `inputRecords` (*type:* `list(float())`, *default:* `nil`) - 
  *   `killedTasks` (*type:* `list(float())`, *default:* `nil`) - 
  *   `memoryBytesSpilled` (*type:* `list(float())`, *default:* `nil`) - 
  *   `outputBytes` (*type:* `list(float())`, *default:* `nil`) - 
  *   `outputRecords` (*type:* `list(float())`, *default:* `nil`) - 
  *   `peakMemoryMetrics` (*type:* `GoogleApi.Dataproc.V1.Model.ExecutorPeakMetricsDistributions.t`, *default:* `nil`) - 
  *   `quantiles` (*type:* `list(float())`, *default:* `nil`) - 
  *   `shuffleRead` (*type:* `list(float())`, *default:* `nil`) - 
  *   `shuffleReadRecords` (*type:* `list(float())`, *default:* `nil`) - 
  *   `shuffleWrite` (*type:* `list(float())`, *default:* `nil`) - 
  *   `shuffleWriteRecords` (*type:* `list(float())`, *default:* `nil`) - 
  *   `succeededTasks` (*type:* `list(float())`, *default:* `nil`) - 
  *   `taskTimeMillis` (*type:* `list(float())`, *default:* `nil`) - 
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :diskBytesSpilled => list(float()) | nil,
          :failedTasks => list(float()) | nil,
          :inputBytes => list(float()) | nil,
          :inputRecords => list(float()) | nil,
          :killedTasks => list(float()) | nil,
          :memoryBytesSpilled => list(float()) | nil,
          :outputBytes => list(float()) | nil,
          :outputRecords => list(float()) | nil,
          :peakMemoryMetrics =>
            GoogleApi.Dataproc.V1.Model.ExecutorPeakMetricsDistributions.t() | nil,
          :quantiles => list(float()) | nil,
          :shuffleRead => list(float()) | nil,
          :shuffleReadRecords => list(float()) | nil,
          :shuffleWrite => list(float()) | nil,
          :shuffleWriteRecords => list(float()) | nil,
          :succeededTasks => list(float()) | nil,
          :taskTimeMillis => list(float()) | nil
        }

  field(:diskBytesSpilled, type: :list)
  field(:failedTasks, type: :list)
  field(:inputBytes, type: :list)
  field(:inputRecords, type: :list)
  field(:killedTasks, type: :list)
  field(:memoryBytesSpilled, type: :list)
  field(:outputBytes, type: :list)
  field(:outputRecords, type: :list)
  field(:peakMemoryMetrics, as: GoogleApi.Dataproc.V1.Model.ExecutorPeakMetricsDistributions)
  field(:quantiles, type: :list)
  field(:shuffleRead, type: :list)
  field(:shuffleReadRecords, type: :list)
  field(:shuffleWrite, type: :list)
  field(:shuffleWriteRecords, type: :list)
  field(:succeededTasks, type: :list)
  field(:taskTimeMillis, type: :list)
end

defimpl Poison.Decoder, for: GoogleApi.Dataproc.V1.Model.ExecutorMetricsDistributions do
  def decode(value, options) do
    GoogleApi.Dataproc.V1.Model.ExecutorMetricsDistributions.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Dataproc.V1.Model.ExecutorMetricsDistributions do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
